home *** CD-ROM | disk | FTP | other *** search
/ Champak 86 / (Vol 86) My Disc.iso / Games / salaodebeleza_229.swf / scripts / frame_2 / DoAction.as
Text File  |  2009-04-21  |  27KB  |  798 lines

  1. function addNewLevel()
  2. {
  3.    levelCounter++;
  4.    _root.createEmptyMovieClip("drawLevel" + levelCounter,levelCounter);
  5.    currentDrawLevel = _root["drawLevel" + levelCounter];
  6. }
  7. function setNailBG()
  8. {
  9.    var _loc1_ = _root;
  10.    levelCounter++;
  11.    if(polishApplied[curNail] != -1)
  12.    {
  13.       if(polishApplied[curNail] == 3)
  14.       {
  15.          drawSemiTransparentNail();
  16.          if(stickers[curNail] != -1)
  17.          {
  18.             if(curNail < 5)
  19.             {
  20.                rotation = 25;
  21.             }
  22.             else
  23.             {
  24.                rotation = 335;
  25.             }
  26.             levelCounter++;
  27.             _loc1_.attachMovie("s_" + stickers[curNail],"s_" + curNail,levelCounter,{_x:stickerCoordinates2Print[curNail][0],_y:stickerCoordinates2Print[curNail][1]});
  28.             _loc1_["s_" + curNail]._rotation = rotation;
  29.             var tmp = "s_" + curNail;
  30.             _loc1_[tmp].gotoAndStop(1);
  31.          }
  32.       }
  33.       else
  34.       {
  35.          curY = Number(nailCoordinates2Print[curNail][1]) + Number(nailLength[3][curNail]) - Number(nailLength[nailShape[curNail]]) - 5;
  36.          curX = Number(nailCoordinates2Print[curNail][0]);
  37.          if(curNail < 5)
  38.          {
  39.             curX -= 10;
  40.          }
  41.          else
  42.          {
  43.             curY += 13;
  44.             curX += 10;
  45.          }
  46.          _loc1_.attachMovie("c_" + polishGroup[curNail] + "_" + polishApplied[curNail],"c_" + polishApplied[curNail] + levelCounter,levelCounter,{_x:curX,_y:curY});
  47.          if(curNail < 5)
  48.          {
  49.             rotation = 25;
  50.          }
  51.          else
  52.          {
  53.             rotation = 335;
  54.          }
  55.          _loc1_["c_" + polishApplied[curNail] + levelCounter]._rotation = rotation;
  56.          addNewLevel();
  57.          maskingLevel = levelCounter - 1;
  58.          _loc1_["c_" + polishApplied[curNail] + maskingLevel].setMask(currentDrawLevel);
  59.          addr450:
  60.          drawNail();
  61.          if(stickers[curNail] != -1)
  62.          {
  63.             levelCounter++;
  64.             if(curNail < 4)
  65.             {
  66.                rotation = 25;
  67.             }
  68.             else if(curNail == 4)
  69.             {
  70.                rotation = 50;
  71.             }
  72.             else if(curNail == 5)
  73.             {
  74.                rotation = 310;
  75.             }
  76.             else
  77.             {
  78.                rotation = 335;
  79.             }
  80.             levelCounter++;
  81.             _loc1_.attachMovie("s_" + stickers[curNail],"s_" + curNail,levelCounter,{_x:stickerCoordinates2Print[curNail][0],_y:stickerCoordinates2Print[curNail][1]});
  82.             _loc1_["s_" + curNail]._rotation = rotation;
  83.             var tmp = "s_" + curNail;
  84.             _loc1_[tmp].gotoAndStop(1);
  85.          }
  86.       }
  87.    }
  88.    drawNailPad();
  89.    levelCounter++;
  90.    _loc1_.createEmptyMovieClip("compaundDrawLevel" + levelCounter,levelCounter);
  91.    compaundDrawLevel = _loc1_["compaundDrawLevel" + levelCounter];
  92.    curY = Number(nailCoordinates2Print[curNail][1]) + Number(nailLength[3][curNail]) - Number(nailLength[nailShape[curNail]]);
  93.    curX = Number(nailCoordinates2Print[curNail][0]);
  94.    if(curNail < 5)
  95.    {
  96.       curX -= 13;
  97.       curY -= 5;
  98.    }
  99.    else
  100.    {
  101.       curX += 11;
  102.       curY += 11;
  103.    }
  104.    var _loc2_ = 2;
  105.    if(curNail < 5)
  106.    {
  107.       rotation = 25;
  108.    }
  109.    else
  110.    {
  111.       rotation = 335;
  112.    }
  113.    if(mixedColors[curNail] != -1)
  114.    {
  115.       compaundDrawLevel.attachMovie("red_bg","red_bg",_loc2_,{_x:curX,_y:curY});
  116.       var _loc3_ = new Color(compaundDrawLevel.red_bg);
  117.       _loc3_.setRGB(mixingColorVals[mixedColors[curNail]]);
  118.       compaundDrawLevel.red_bg._rotation = rotation;
  119.    }
  120.    if(mixedBackgrounds[curNail] != -1)
  121.    {
  122.       _loc2_ = _loc2_ + 1;
  123.       compaundDrawLevel.attachMovie("p_" + mixedBackgrounds[curNail],"p_" + mixedBackgrounds[curNail],_loc2_,{_x:curX,_y:curY});
  124.       compaundDrawLevel["p_" + mixedBackgrounds[curNail]]._rotation = rotation;
  125.    }
  126.    addNewLevel();
  127.    compaundDrawLevel.setMask(currentDrawLevel);
  128.    ┬º┬ºgoto(addr450);
  129. }
  130. function drawNail()
  131. {
  132.    if(curNail > 4)
  133.    {
  134.       var _loc1_ = nailShape;
  135.       curY = Number(nailCoordinates2Print[curNail][1]) + Number(nailLength[3][curNail]) - Number(nailLength[_loc1_][curNail]);
  136.       curX = Number(nailCoordinates2Print[curNail][0]) + Number(nailWidth[3][curNail - 5]) - Number(nailWidth[_loc1_][curNail - 5]);
  137.    }
  138.    else
  139.    {
  140.       curY = Number(nailCoordinates2Print[curNail][1]) + Number(nailLength[3][curNail]) - Number(nailLength[nailShape[curNail]]);
  141.       curX = nailCoordinates2Print[curNail][0];
  142.    }
  143.    currentDrawLevel.attachMovie("nail_" + curNail + "_" + nailShape,"nail_" + curNail,levelCounter,{_x:curX,_y:curY});
  144.    levelCounter++;
  145.    _root.attachMovie("hl_" + curNail + "_" + nailShape,"hl_" + curNail,levelCounter,{_x:curX,_y:curY});
  146.    levelCounter++;
  147.    _root.attachMovie("contour_" + curNail + "_" + nailShape,"contour_" + curNail,levelCounter,{_x:curX,_y:curY});
  148. }
  149. function drawNailPad()
  150. {
  151.    levelCounter++;
  152.    if(curNail > 4)
  153.    {
  154.       var _loc1_ = nailShape;
  155.       curY = Number(nailCoordinates2Print[curNail][1]) + Number(nailLength[3][curNail]) - Number(nailLength[_loc1_][curNail]);
  156.       curX = Number(nailCoordinates2Print[curNail][0]) + Number(nailWidth[3][curNail - 5]) - Number(nailWidth[_loc1_][curNail - 5]);
  157.    }
  158.    else
  159.    {
  160.       curY = Number(nailCoordinates2Print[curNail][1]) + Number(nailLength[3][curNail]) - Number(nailLength[nailShape[curNail]]);
  161.       curX = nailCoordinates2Print[curNail][0];
  162.    }
  163.    _root.attachMovie("nail_" + curNail + "_" + nailShape,"nailPad_" + curNail,levelCounter,{_x:curX,_y:curY});
  164. }
  165. function drawSemiTransparentNail()
  166. {
  167.    drawNailPad();
  168.    addNewLevel();
  169.    currentDrawLevel.attachMovie("nail_" + curNail + "_" + nailShape,"nail_" + curNail,levelCounter,{_x:curX,_y:curY});
  170.    createSemiTrasparentColor();
  171.    theOldColor = new Color(currentDrawLevel["nail_" + curNail]);
  172.    theOldColor.setTransform(semiTransparentTransform);
  173.    levelCounter++;
  174.    currentDrawLevel.attachMovie("tip_" + curNail + "_" + nailShape,"tip_" + curNail,levelCounter,{_x:curX,_y:curY});
  175.    levelCounter++;
  176.    currentDrawLevel.attachMovie("hl_" + curNail + "_" + nailShape,"hl_" + curNail,levelCounter,{_x:curX,_y:curY});
  177.    levelCounter++;
  178.    currentDrawLevel.attachMovie("contour_" + curNail + "_" + nailShape,"contour_" + curNail,levelCounter,{_x:curX,_y:curY});
  179. }
  180. function createSemiTrasparentColor()
  181. {
  182.    var _loc1_ = polishGroup[curNail];
  183.    semiTransparentTransform = new Object();
  184.    semiTransparentTransform.ra = 50;
  185.    semiTransparentTransform.rb = colorGroupVals[_loc1_][0];
  186.    semiTransparentTransform.ga = 40;
  187.    semiTransparentTransform.gb = colorGroupVals[_loc1_][1];
  188.    semiTransparentTransform.ba = 12;
  189.    semiTransparentTransform.bb = colorGroupVals[_loc1_][2];
  190.    semiTransparentTransform.aa = 20;
  191.    semiTransparentTransform.ab = 20;
  192. }
  193. function setNails()
  194. {
  195.    var _loc1_ = 0;
  196.    while(_loc1_ < 10)
  197.    {
  198.       curNail = _loc1_;
  199.       setNailBG();
  200.       _loc1_ = _loc1_ + 1;
  201.    }
  202. }
  203. function setRings()
  204. {
  205.    var _loc3_ = _root;
  206.    var _loc1_ = 0;
  207.    while(_loc1_ < rings.length)
  208.    {
  209.       levelCounter++;
  210.       var _loc2_ = choosenRingsFingerPosition[_loc1_];
  211.       rotation = 0;
  212.       if(_loc2_ > 4)
  213.       {
  214.          rotation = 300;
  215.       }
  216.       curX = Number(choosenRingsCoordinates[_loc1_][0]) - Number(73);
  217.       curY = Number(choosenRingsCoordinates[_loc1_][1]) - Number(10);
  218.       _loc3_.attachMovie(rings[_loc1_],"r2Print_" + _loc1_,levelCounter,{_x:curX,_y:curY});
  219.       _loc3_["r2Print_" + _loc1_]._rotation = rotation;
  220.       if(_loc2_ == 0 || _loc2_ == 4 || _loc2_ == 5 || _loc2_ == 9)
  221.       {
  222.          _loc3_["r2Print_" + _loc1_]._xscale = 80;
  223.          _loc3_["r2Print_" + _loc1_]._yscale = 80;
  224.       }
  225.       _loc1_ = _loc1_ + 1;
  226.    }
  227. }
  228. function setBracelets()
  229. {
  230.    var _loc3_ = _root;
  231.    var _loc1_ = 0;
  232.    while(_loc1_ < 2)
  233.    {
  234.       if(bracelets[_loc1_] != -1)
  235.       {
  236.          if(customBracelets[_loc1_] != -100)
  237.          {
  238.             rotation = 330;
  239.             if(_loc1_ == 0)
  240.             {
  241.                rotation = 30;
  242.             }
  243.             curX = Number(choosenBraceletCoordinates[_loc1_][0]) - Number(73);
  244.             curY = Number(choosenBraceletCoordinates[_loc1_][1]) - Number(10);
  245.             levelCounter++;
  246.             if(customBracelets[_loc1_] != -1)
  247.             {
  248.                _loc3_.attachMovie("custom_bracelet_" + customBracelets[_loc1_],"br2Print_" + _loc1_ + levelCounter,levelCounter,{_x:curX,_y:curY});
  249.             }
  250.             else
  251.             {
  252.                _loc3_.createEmptyMovieClip("br2Print_" + _loc1_ + levelCounter,levelCounter);
  253.                _loc3_["br2Print_" + _loc1_ + levelCounter]._x = curX;
  254.                _loc3_["br2Print_" + _loc1_ + levelCounter]._y = curY;
  255.             }
  256.             tmp = "br2Print_" + _loc1_ + levelCounter;
  257.             var beadCoord_tmp;
  258.             var braceletCoord_tmp;
  259.             var customBds_tmp;
  260.             var _loc2_ = 0;
  261.             while(_loc2_ < customBracelet.length)
  262.             {
  263.                if(customBracelet[_loc2_] == customBracelets[_loc1_])
  264.                {
  265.                   customBds_tmp = customBeads[_loc2_];
  266.                   beadCoord_tmp = customBeadsCoordinates[_loc2_];
  267.                   braceletCoord_tmp = customBraceletCoordinates[_loc2_];
  268.                   break;
  269.                }
  270.                _loc2_ = _loc2_ + 1;
  271.             }
  272.             _loc2_ = 0;
  273.             while(_loc2_ < customBds_tmp.length)
  274.             {
  275.                curX = Number(beadCoord_tmp[_loc2_][0] - braceletCoord_tmp[0]);
  276.                curY = Number(beadCoord_tmp[_loc2_][1] - braceletCoord_tmp[1]);
  277.                levelCounter++;
  278.                _loc3_[tmp].attachMovie("bead_" + customBds_tmp[_loc2_],"bead2Print_" + levelCounter,levelCounter,{_x:curX,_y:curY});
  279.                _loc2_ = _loc2_ + 1;
  280.             }
  281.             _loc3_[tmp]._rotation = rotation;
  282.          }
  283.          else
  284.          {
  285.             rotation = 0;
  286.             if(_loc1_ == 0)
  287.             {
  288.                rotation = 60;
  289.             }
  290.             var brNumber = braceletNumbers[_loc1_];
  291.             curX = Number(choosenBraceletCoordinates[_loc1_][0]) - Number(73);
  292.             curY = Number(choosenBraceletCoordinates[_loc1_][1]) - Number(10);
  293.             levelCounter++;
  294.             _loc3_.attachMovie("bracelet_" + brNumber,"br2Print_" + _loc1_ + levelCounter,levelCounter,{_x:curX,_y:curY});
  295.             _loc3_["br2Print_" + _loc1_ + levelCounter]._rotation = rotation;
  296.          }
  297.       }
  298.       _loc1_ = _loc1_ + 1;
  299.    }
  300. }
  301. function setHandsColor()
  302. {
  303.    var _loc1_ = new Color(bg_done.done_hands);
  304.    _loc1_.setRGB(handsColors[curHandsColor]);
  305. }
  306. function cleanAndCloseSendPopup()
  307. {
  308.    send_popup.mail_1.text = "";
  309.    send_popup.mail_2.text = "";
  310.    send_popup.mail_3.text = "";
  311.    send_popup.name.text = "";
  312.    send_popup.status.text = "";
  313.    send_popup._visible = false;
  314. }
  315. function emailValidation(str)
  316. {
  317.    var _loc3_ = false;
  318.    var _loc2_ = str.indexOf("@");
  319.    var _loc1_ = str.indexOf(".");
  320.    var nCheckThree = str.length;
  321.    if(_loc2_ != -1 && _loc1_ != -1 && _loc2_ < _loc1_ && nCheckThree > _loc1_ + Number(1))
  322.    {
  323.       _loc3_ = true;
  324.    }
  325.    return _loc3_;
  326. }
  327. function displaySuccessNotification()
  328. {
  329.    levelCounter++;
  330.    success_message.swapDepths(levelCounter);
  331.    success_message._visible = true;
  332. }
  333. stop();
  334. var printing = false;
  335. var levelCounter = 2;
  336. var nailCoordinates2Print = new Array();
  337. nailCoordinates2Print.push(["205","192"]);
  338. nailCoordinates2Print.push(["241","170"]);
  339. nailCoordinates2Print.push(["273","166"]);
  340. nailCoordinates2Print.push(["291","199"]);
  341. nailCoordinates2Print.push(["286","302"]);
  342. nailCoordinates2Print.push(["335","303"]);
  343. nailCoordinates2Print.push(["340","199"]);
  344. nailCoordinates2Print.push(["356","166"]);
  345. nailCoordinates2Print.push(["386","170"]);
  346. nailCoordinates2Print.push(["422","191"]);
  347. var stickerCoordinates2Print = new Array();
  348. stickerCoordinates2Print.push(["213","209"]);
  349. stickerCoordinates2Print.push(["249","189"]);
  350. stickerCoordinates2Print.push(["280","188"]);
  351. stickerCoordinates2Print.push(["297","219"]);
  352. stickerCoordinates2Print.push(["298","321"]);
  353. stickerCoordinates2Print.push(["351","327"]);
  354. stickerCoordinates2Print.push(["347","223"]);
  355. stickerCoordinates2Print.push(["363","191"]);
  356. stickerCoordinates2Print.push(["395","195"]);
  357. stickerCoordinates2Print.push(["434","215"]);
  358. levelCounter++;
  359. _root.attachMovie("send_popup","send_popup",levelCounter,{_x:123,_y:167});
  360. send_popup._visible = false;
  361. levelCounter++;
  362. _root.attachMovie("success_message","success_message",levelCounter,{_x:113,_y:185});
  363. success_message._visible = false;
  364. levelCounter++;
  365. _root.attachMovie("sand_clock","sand_clock1",levelCounter,{_x:319,_y:253});
  366. sand_clock1._visible = false;
  367. cur_Sound = new Sound();
  368. cur_Sound.attachSound("wow.mp3");
  369. cur_Sound.start();
  370. setHandsColor();
  371. setNails();
  372. setRings();
  373. setBracelets();
  374. play_again.onPress = function()
  375. {
  376.    var _loc1_ = _root;
  377.    cur_Sound = new Sound();
  378.    cur_Sound.attachSound("buttons.mp3");
  379.    cur_Sound.start();
  380.    sand_clock1._visible = false;
  381.    for(var _loc2_ in _loc1_)
  382.    {
  383.       if(_loc1_[_loc2_] instanceof MovieClip)
  384.       {
  385.          if(_loc1_[_loc2_]._name == "bg_done" || _loc1_[_loc2_]._name == "play_again" || _loc1_[_loc2_]._name == "save")
  386.          {
  387.             continue;
  388.          }
  389.          _loc1_[_loc2_].removeMovieClip();
  390.       }
  391.    }
  392.    gotoAndStop("main");
  393. };
  394. save.onPress = function()
  395. {
  396.    if(premium == 0)
  397.    {
  398.       getUrl("javascript:TrialRestriction()", "");
  399.    }
  400.    else
  401.    {
  402.       cur_Sound = new Sound();
  403.       cur_Sound.attachSound("buttons.mp3");
  404.       cur_Sound.start();
  405.       var lvData = new LoadVars();
  406.       var xmlResult = new XML();
  407.       var xmlCreation = new XMLNode(1,"data");
  408.       xmlResult.appendChild(xmlCreation);
  409.       var xnHandsColor = new XMLNode(1,"handsColor");
  410.       var xnHandsColorValue = new XMLNode(3,handsColors[curHandsColor]);
  411.       xmlCreation.appendChild(xnHandsColor);
  412.       xnHandsColor.appendChild(xnHandsColorValue);
  413.       var xnNickname = new XMLNode(1,"nickname");
  414.       var xnNicknameValue = new XMLNode(3,nickname);
  415.       xmlCreation.appendChild(xnNickname);
  416.       xnNickname.appendChild(xnNicknameValue);
  417.       var xnnailShape = new XMLNode(1,"nailShape");
  418.       var xnnailShapeValue = new XMLNode(3,nailShape);
  419.       xmlCreation.appendChild(xnnailShape);
  420.       xnnailShape.appendChild(xnnailShapeValue);
  421.       var _loc1_ = "";
  422.       i = 0;
  423.       while(i < 10)
  424.       {
  425.          _loc1_ += polishGroup[i];
  426.          if(i < 9)
  427.          {
  428.             _loc1_ += ",";
  429.          }
  430.          i++;
  431.       }
  432.       var xnpolishGroup = new XMLNode(1,"polishGroup");
  433.       var xnpolishGroupValue = new XMLNode(3,_loc1_);
  434.       xmlCreation.appendChild(xnpolishGroup);
  435.       xnpolishGroup.appendChild(xnpolishGroupValue);
  436.       _loc1_ = "";
  437.       i = 0;
  438.       while(i < 10)
  439.       {
  440.          _loc1_ += polishApplied[i];
  441.          if(i < 9)
  442.          {
  443.             _loc1_ += ",";
  444.          }
  445.          i++;
  446.       }
  447.       var xnpolishApplied = new XMLNode(1,"polishApplied");
  448.       var xnpolishAppliedValue = new XMLNode(3,_loc1_);
  449.       xmlCreation.appendChild(xnpolishApplied);
  450.       xnpolishApplied.appendChild(xnpolishAppliedValue);
  451.       _loc1_ = "";
  452.       i = 0;
  453.       while(i < 10)
  454.       {
  455.          _loc1_ += mixedColors[i];
  456.          if(i < 9)
  457.          {
  458.             _loc1_ += ",";
  459.          }
  460.          i++;
  461.       }
  462.       var xnmixedColors = new XMLNode(1,"mixedColors");
  463.       var xnmixedColorsValue = new XMLNode(3,_loc1_);
  464.       xmlCreation.appendChild(xnmixedColors);
  465.       xnmixedColors.appendChild(xnmixedColorsValue);
  466.       _loc1_ = "";
  467.       i = 0;
  468.       while(i < 10)
  469.       {
  470.          _loc1_ += mixedBackgrounds[i];
  471.          if(i < 9)
  472.          {
  473.             _loc1_ += ",";
  474.          }
  475.          i++;
  476.       }
  477.       var xnmixedBackgrounds = new XMLNode(1,"mixedBackgrounds");
  478.       var xnmixedBackgroundsValue = new XMLNode(3,_loc1_);
  479.       xmlCreation.appendChild(xnmixedBackgrounds);
  480.       xnmixedBackgrounds.appendChild(xnmixedBackgroundsValue);
  481.       _loc1_ = "";
  482.       i = 0;
  483.       while(i < 10)
  484.       {
  485.          _loc1_ += stickers[i];
  486.          if(i < 9)
  487.          {
  488.             _loc1_ += ",";
  489.          }
  490.          i++;
  491.       }
  492.       var xnstickers = new XMLNode(1,"stickers");
  493.       var xnstickersValue = new XMLNode(3,_loc1_);
  494.       xmlCreation.appendChild(xnstickers);
  495.       xnstickers.appendChild(xnstickersValue);
  496.       var _loc2_ = rings.length;
  497.       _loc1_ = "";
  498.       i = 0;
  499.       while(i < _loc2_)
  500.       {
  501.          _loc1_ += rings[i];
  502.          if(i < _loc2_ - 1)
  503.          {
  504.             _loc1_ += ",";
  505.          }
  506.          i++;
  507.       }
  508.       var xnrings = new XMLNode(1,"rings");
  509.       var xnringsValue = new XMLNode(3,_loc1_);
  510.       xmlCreation.appendChild(xnrings);
  511.       xnrings.appendChild(xnringsValue);
  512.       _loc1_ = "";
  513.       i = 0;
  514.       while(i < _loc2_)
  515.       {
  516.          _loc1_ += choosenRingsFingerPosition[i];
  517.          if(i < _loc2_ - 1)
  518.          {
  519.             _loc1_ += ",";
  520.          }
  521.          i++;
  522.       }
  523.       var xnchoosenRingsFingerPosition = new XMLNode(1,"choosenRingsFingerPosition");
  524.       var xnchoosenRingsFingerPositionValue = new XMLNode(3,_loc1_);
  525.       xmlCreation.appendChild(xnchoosenRingsFingerPosition);
  526.       xnchoosenRingsFingerPosition.appendChild(xnchoosenRingsFingerPositionValue);
  527.       _loc1_ = "";
  528.       i = 0;
  529.       while(i < _loc2_)
  530.       {
  531.          _loc1_ += choosenRingsCoordinates[i][0];
  532.          if(i < _loc2_ - 1)
  533.          {
  534.             _loc1_ += ",";
  535.          }
  536.          i++;
  537.       }
  538.       var xnchoosenRingsCoordinates_X = new XMLNode(1,"choosenRingsCoordinates_X");
  539.       var xnchoosenRingsCoordinates_XValue = new XMLNode(3,_loc1_);
  540.       xmlCreation.appendChild(xnchoosenRingsCoordinates_X);
  541.       xnchoosenRingsCoordinates_X.appendChild(xnchoosenRingsCoordinates_XValue);
  542.       _loc1_ = "";
  543.       i = 0;
  544.       while(i < _loc2_)
  545.       {
  546.          _loc1_ += choosenRingsCoordinates[i][1];
  547.          if(i < _loc2_ - 1)
  548.          {
  549.             _loc1_ += ",";
  550.          }
  551.          i++;
  552.       }
  553.       var xnchoosenRingsCoordinates_Y = new XMLNode(1,"choosenRingsCoordinates_Y");
  554.       var xnchoosenRingsCoordinates_YValue = new XMLNode(3,_loc1_);
  555.       xmlCreation.appendChild(xnchoosenRingsCoordinates_Y);
  556.       xnchoosenRingsCoordinates_Y.appendChild(xnchoosenRingsCoordinates_YValue);
  557.       _loc1_ = "";
  558.       i = 0;
  559.       while(i < 2)
  560.       {
  561.          _loc1_ += bracelets[i];
  562.          if(i < 1)
  563.          {
  564.             _loc1_ += ",";
  565.          }
  566.          i++;
  567.       }
  568.       var xnbracelets = new XMLNode(1,"bracelets");
  569.       var xnbraceletsValue = new XMLNode(3,_loc1_);
  570.       xmlCreation.appendChild(xnbracelets);
  571.       xnbracelets.appendChild(xnbraceletsValue);
  572.       _loc1_ = "";
  573.       i = 0;
  574.       while(i < 2)
  575.       {
  576.          _loc1_ += customBracelets[i];
  577.          if(i < 1)
  578.          {
  579.             _loc1_ += ",";
  580.          }
  581.          i++;
  582.       }
  583.       var xncustomBracelets = new XMLNode(1,"customBracelets");
  584.       var xncustomBraceletsValue = new XMLNode(3,_loc1_);
  585.       xmlCreation.appendChild(xncustomBracelets);
  586.       xncustomBracelets.appendChild(xncustomBraceletsValue);
  587.       _loc2_ = customBracelet.length;
  588.       _loc1_ = "";
  589.       i = 0;
  590.       while(i < _loc2_)
  591.       {
  592.          _loc1_ += customBracelet[i];
  593.          if(i < _loc2_ - 1)
  594.          {
  595.             _loc1_ += ",";
  596.          }
  597.          i++;
  598.       }
  599.       var xncustomBracelet = new XMLNode(1,"customBracelet");
  600.       var xncustomBraceletValue = new XMLNode(3,_loc1_);
  601.       xmlCreation.appendChild(xncustomBracelet);
  602.       xncustomBracelet.appendChild(xncustomBraceletValue);
  603.       _loc1_ = "";
  604.       var result1 = "";
  605.       var result2 = "";
  606.       var result3 = "";
  607.       _loc2_ = customBracelet.length;
  608.       var i = 0;
  609.       while(i < _loc2_)
  610.       {
  611.          _loc1_ += customBeads[i].length;
  612.          if(i < _loc2_ - 1)
  613.          {
  614.             _loc1_ += ",";
  615.          }
  616.          var _loc3_ = 0;
  617.          while(_loc3_ < customBeads[i].length)
  618.          {
  619.             result1 += customBeads[i][_loc3_];
  620.             result1 += ",";
  621.             _loc3_ = _loc3_ + 1;
  622.          }
  623.          _loc3_ = 0;
  624.          while(_loc3_ < customBeadsCoordinates[i].length)
  625.          {
  626.             result2 += customBeadsCoordinates[i][_loc3_];
  627.             result2 += ",";
  628.             _loc3_ = _loc3_ + 1;
  629.          }
  630.          _loc3_ = 0;
  631.          while(_loc3_ < customBraceletCoordinates[i].length)
  632.          {
  633.             result3 += customBraceletCoordinates[i][_loc3_];
  634.             result3 += ",";
  635.             _loc3_ = _loc3_ + 1;
  636.          }
  637.          i++;
  638.       }
  639.       var xncustomBraceletCoordinates = new XMLNode(1,"customBraceletCoordinates");
  640.       var xncustomBraceletCoordinatesValue = new XMLNode(3,result3);
  641.       xmlCreation.appendChild(xncustomBraceletCoordinates);
  642.       xncustomBraceletCoordinates.appendChild(xncustomBraceletCoordinatesValue);
  643.       var xnbeadsPerBracelet = new XMLNode(1,"beadsPerBracelet");
  644.       var xnbeadsPerBraceletValue = new XMLNode(3,_loc1_);
  645.       xmlCreation.appendChild(xnbeadsPerBracelet);
  646.       xnbeadsPerBracelet.appendChild(xnbeadsPerBraceletValue);
  647.       var xncustomBeads = new XMLNode(1,"customBeads");
  648.       var xncustomBeadsValue = new XMLNode(3,result1);
  649.       xmlCreation.appendChild(xncustomBeads);
  650.       xncustomBeads.appendChild(xncustomBeadsValue);
  651.       var xncustomBeadsCoordinates = new XMLNode(1,"customBeadsCoordinates");
  652.       var xncustomBeadsCoordinatesValue = new XMLNode(3,result2);
  653.       xmlCreation.appendChild(xncustomBeadsCoordinates);
  654.       xncustomBeadsCoordinates.appendChild(xncustomBeadsCoordinatesValue);
  655.       _loc1_ = "";
  656.       i = 0;
  657.       while(i < 2)
  658.       {
  659.          _loc1_ += braceletNumbers[i];
  660.          if(i < 1)
  661.          {
  662.             _loc1_ += ",";
  663.          }
  664.          i++;
  665.       }
  666.       var xnbraceletNumbers = new XMLNode(1,"braceletNumbers");
  667.       var xnbraceletNumbersValue = new XMLNode(3,_loc1_);
  668.       xmlCreation.appendChild(xnbraceletNumbers);
  669.       xnbraceletNumbers.appendChild(xnbraceletNumbersValue);
  670.       _loc1_ = "";
  671.       i = 0;
  672.       while(i < 2)
  673.       {
  674.          _loc1_ += choosenBraceletCoordinates[i][0];
  675.          if(i < 1)
  676.          {
  677.             _loc1_ += ",";
  678.          }
  679.          i++;
  680.       }
  681.       var xnchoosenBraceletCoordinates_X = new XMLNode(1,"choosenBraceletCoordinates_X");
  682.       var xnchoosenBraceletCoordinates_XValue = new XMLNode(3,_loc1_);
  683.       xmlCreation.appendChild(xnchoosenBraceletCoordinates_X);
  684.       xnchoosenBraceletCoordinates_X.appendChild(xnchoosenBraceletCoordinates_XValue);
  685.       _loc1_ = "";
  686.       i = 0;
  687.       while(i < 2)
  688.       {
  689.          _loc1_ += choosenBraceletCoordinates[i][1];
  690.          if(i < 1)
  691.          {
  692.             _loc1_ += ",";
  693.          }
  694.          i++;
  695.       }
  696.       var xnchoosenBraceletCoordinates_Y = new XMLNode(1,"choosenBraceletCoordinates_Y");
  697.       var xnchoosenBraceletCoordinates_YValue = new XMLNode(3,_loc1_);
  698.       xmlCreation.appendChild(xnchoosenBraceletCoordinates_Y);
  699.       xnchoosenBraceletCoordinates_Y.appendChild(xnchoosenBraceletCoordinates_YValue);
  700.       lvData.data = xmlResult;
  701.       lvReceived = new LoadVars();
  702.       lvData.sendAndLoad("http://www.girlsense.com/premium/manicure/save.pl",lvReceived);
  703.       lvReceived.onLoad = function(success)
  704.       {
  705.          var _loc2_ = this;
  706.          if(success)
  707.          {
  708.             for(var _loc1_ in _loc2_)
  709.             {
  710.                if(_loc1_ != null)
  711.                {
  712.                   CreationID = _loc1_;
  713.                   levelCounter++;
  714.                   send_popup.swapDepths(levelCounter);
  715.                   send_popup._visible = true;
  716.                   break;
  717.                }
  718.             }
  719.          }
  720.       };
  721.    }
  722. };
  723. var CreationID = -1;
  724. send_popup.cancel_send.onPress = function()
  725. {
  726.    sand_clock1._visible = false;
  727.    cleanAndCloseSendPopup();
  728. };
  729. send_popup.send_send.onPress = function()
  730. {
  731.    if(send_popup.mail_1.text == "" && send_popup.mail_2.text == "" && send_popup.mail_3.text == "")
  732.    {
  733.       send_popup.status.text = "Please specify some recipients.";
  734.    }
  735.    else
  736.    {
  737.       if(send_popup.mail_1.text != "")
  738.       {
  739.          if(!emailValidation(send_popup.mail_1.text))
  740.          {
  741.             send_popup.status.text = "Invalid e-mail address.";
  742.          }
  743.       }
  744.       if(send_popup.mail_2.text != "")
  745.       {
  746.          if(!emailValidation(send_popup.mail_2.text))
  747.          {
  748.             send_popup.status.text = "Invalid e-mail address.";
  749.          }
  750.       }
  751.       if(send_popup.mail_3.text != "")
  752.       {
  753.          if(!emailValidation(send_popup.mail_3.text))
  754.          {
  755.             send_popup.status.text = "Invalid e-mail address.";
  756.          }
  757.       }
  758.       var _loc1_ = new LoadVars();
  759.       _loc1_.mail_1 = send_popup.mail_1.text;
  760.       _loc1_.mail_2 = send_popup.mail_2.text;
  761.       _loc1_.mail_3 = send_popup.mail_3.text;
  762.       _loc1_.name = send_popup.name.text;
  763.       _loc1_.creationID = CreationID;
  764.       lvReceived = new LoadVars();
  765.       _loc1_.sendAndLoad("http://www.girlsense.com/premium/manicure/mail.pl",lvReceived);
  766.       cleanAndCloseSendPopup();
  767.       levelCounter++;
  768.       sand_clock1.swapDepths(levelCounter);
  769.       sand_clock1._visible = true;
  770.       lvReceived.onLoad = function(success)
  771.       {
  772.          if(success)
  773.          {
  774.             sand_clock1._visible = false;
  775.             success_message.the_url.html = true;
  776.             success_message.the_url.htmlText = "<a href=\'http://www.girlsense.com/premium/manicure/viewer.htm?id=" + CreationID + "\'  target=\'_blank\'><b>http://www.girlsense.com/premium/manicure/viewer.htm?id=" + CreationID + "</b></a>";
  777.             displaySuccessNotification();
  778.          }
  779.       };
  780.    }
  781. };
  782. success_message.ok_success.onPress = function()
  783. {
  784.    success_message._visible = false;
  785. };
  786. feedback.onPress = function()
  787. {
  788.    getUrl("javascript:feedback()", "");
  789. };
  790. gs_symbol.onPress = function()
  791. {
  792.    getUrl("http://www.girlsense.com/premium/", "_blank");
  793. };
  794. gs_title_1.onPress = function()
  795. {
  796.    getUrl("http://www.girlsense.com/premium/", "_blank");
  797. };
  798.